<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="include.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<%@ include file="head.jsp"%>
<title>Save update product</title>
</head>

<body>
	<div class="container-fluid">
		<div class="page-header">
			<h2>Edit product</h2>
		</div>
		<form:form method="POST" cssClass="form-horizontal" commandName="product"
			action="${pageContext.request.contextPath}/admin/update">
			<form:hidden path="id" />
			<form:errors path="*" cssClass="alert alert-error" element="div" />
			<div class="control-group">
				<label class="control-label">Name</label>
				<div class="controls">
					<form:input path="name" />
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">Price</label>
				<div class="controls">
					<form:input path="price" />
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">Overview</label>
				<div class="controls">
					<form:textarea path="overview" />
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">Category</label>
				<div class="controls">
					<form:select path="category">
						<form:options items="${listCategory}" itemLabel="name" itemValue="id" />
					</form:select>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">Manufacturer</label>
				<div class="controls">
					<form:select path="manufacturer">
						<form:options items="${listManufacturer}" itemLabel="name" itemValue="id" />
					</form:select>
				</div>
			</div>

			<div class="control-group">
				<div class="controls">
					<input class="btn" type="submit"
						value="<spring:message code="button.save" />" /> <a class="btn"
						href="${pageContext.request.contextPath}/user">Back</a>
				</div>
			</div>
		</form:form>
	</div>
</body>
</html>